//
//  MDHURLParameters.h
//  JSTech
//
//  Created by 高得华 on 2019/4/23.
//  Copyright © 2020 华&梅. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SAMKeychain+MDHPTUtil.h"


/// 项目额外的配置参数拓展 (PS)开发人员无需考虑
@interface MDHURLExtendsParameters : NSObject

/// 类方法
+ (MDHURLExtendsParameters *_Nullable)extendsParameters;

/// 用户token，默认空字符串
@property (nonatomic, readonly, copy) NSString * _Nullable authorization;

/// 设备编号，自行生成
//@property (nonatomic, readonly, copy) NSString *device_id;
@property (nonatomic, readonly, copy) NSString * _Nullable app_device_id;

/// 设备编号，自行生成 第三方的device_did
@property (nonatomic, readonly, copy) NSString * _Nullable device_did;

/// app版本号
@property (nonatomic, readonly, copy) NSString * _Nullable version;

/// 平台 pc,wap,android,ios
@property (nonatomic, readonly, copy) NSString * _Nullable source;

/// 渠道 AppStore
@property (nonatomic, readonly, copy) NSString * _Nullable channel;
///channel_code
@property (nonatomic, readonly, copy) NSString * _Nullable channel_code;

/// 时间戳 /// 13位的时间戳
@property (nonatomic, readonly, copy) NSString * _Nullable time_stamp;

///ads_idf
@property (nonatomic, readonly, copy) NSString * _Nullable ads_idf;

@end


NS_ASSUME_NONNULL_BEGIN

@interface MDHURLParameters : NSObject

/// 路径 （v14/order）
@property (nonatomic, readwrite, strong) NSString * path;
/// 参数列表
@property (nonatomic, readwrite, strong) NSDictionary * parameters;
/// 方法 （POST/GET）
@property (nonatomic, readwrite, strong) NSString * method;
/// 拓展的参数属性
@property (nonatomic, readwrite, strong) MDHURLExtendsParameters * extendsParameters;

/**
 参数配置（统一用这个方法配置参数） （SBBaseUrl : https://api.cleancool.tenqing.com/）
 https://api.cleancool.tenqing.com/user/info?user_id=100013
 @param method 方法名 （GET/POST/...）
 @param path 文件路径 （user/info）
 @param parameters 具体参数 @{user_id:10013}
 @return 返回一个参数实例
 */
+ (instancetype)urlParametersWithMethod:(NSString *)method path:(NSString *)path parameters:(NSDictionary *)parameters;

@end

NS_ASSUME_NONNULL_END
